package com.woniu.darryringmall.front.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.darryringmall.front.entity.Category;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select * from mall_category where pid = #{pid}")
    List<Category> getByPid(int pid);

    @Select("select * from mall_category where name = #{name}")
    Category getByName(String name);

    @Select("select * from mall_category where status='y' and navor = 'y' and type = #{type}")
    List<Category> getList(String type);

}
